package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"goods-mgr/api/internal/config"
	"goods-mgr/orderrpc/orderrpcclient"
)

type ServiceContext struct {
	Config   config.Config
	OrderRpc orderrpcclient.Orderrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		OrderRpc: orderrpcclient.NewOrderrpc(zrpc.MustNewClient(c.OrderRpc)),
	}
}
